package com.easyweb.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.easyweb.dao.BaseDao;
import com.easyweb.dao.PollingPictureDao;
import com.easyweb.model.PollingPicture;
@Repository
public class PollingPictureDaoImpl extends BaseDao implements PollingPictureDao{

	public int insertPollingPicture(PollingPicture pollingPicture) {
		return getSqlSession().insert("pollingpicture.insertPollingPicture",pollingPicture);
	}

	public int deletePollingPictureById(Map<String, Object> map) {
		return getSqlSession().delete("pollingpicture.deletePollingPictureById", map);
	}

	public int updatePollingPicture(PollingPicture pollingPicture) {
		return getSqlSession().update("pollingpicture.updatePollingPictureById", pollingPicture);
	}

	public List<PollingPicture> getPollingPictures(Map<String, Object> map) {
		return getSqlSession().selectList("pollingpicture.selectPollingPictures", map);
	}

	public PollingPicture getPollingPictureById(Map<String, Object> map) {
		return getSqlSession().selectOne("pollingpicture.selectPollingPictures", map);
	}

	public List<PollingPicture> getIndexPollingPictures(Map<String, Object> map) {
		return getSqlSession().selectList("pollingpicture.selectIndexPollingPictures", map);
	}

}
